'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace Shell

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.Shell.IFileSaveDialog)> _
    Public Interface IFileSaveDialog
        <PreserveSig()> Function AddPlace(<MarshalAs(UnmanagedType.Interface)> ByVal psi As IShellItem, ByVal fdap As FDAP) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Advise(<MarshalAs(UnmanagedType.Interface)> ByVal pfde As IFileDialogEvents, <Out()> ByRef pdwCookie As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ClearClientData() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Close(<MarshalAs(UnmanagedType.Error)> ByVal hr As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetCurrentSelection(<Out(), MarshalAs(UnmanagedType.Interface)> ByRef ppsi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFileName(<Out(), MarshalAs(UnmanagedType.LPWStr)> ByRef pszName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFileTypeIndex(<Out()> ByRef piFileType As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFolder(<Out(), MarshalAs(UnmanagedType.Interface)> ByRef ppsi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetOptions(<Out()> ByRef fos As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetResult(<Out(), MarshalAs(UnmanagedType.Interface)> ByRef ppsi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetClientGuid(ByRef guid As Guid) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetDefaultExtension(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszDefaultExtension As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetDefaultFolder(<MarshalAs(UnmanagedType.Interface)> ByVal psi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFileName(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszName As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFileNameLabel(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszLabel As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFileTypeIndex(ByVal iFileType As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFileTypes(ByVal cFileTypes As UInteger, ByVal rgFilterSpec() As ComDlgFilterSpec) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFilter(<MarshalAs(UnmanagedType.Interface)> ByVal pFilter As IShellItemFilter) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFolder(<MarshalAs(UnmanagedType.Interface)> ByVal psi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetOkButtonLabel(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszText As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetOptions(ByVal fos As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetTitle(<MarshalAs(UnmanagedType.LPWStr)> ByVal pszTitle As String) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Show(ByVal hwndParent As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Unadvise(ByVal dwCookie As UInteger) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function SetSaveAsItem(<MarshalAs(UnmanagedType.Interface)> ByVal psi As IShellItem) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetProperties(<MarshalAs(UnmanagedType.Interface)> ByVal pStore As IPropertyStore) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetCollectedProperties(<MarshalAs(UnmanagedType.Interface)> ByVal pList As IPropertyDescriptionList, <MarshalAs(UnmanagedType.Bool)> ByVal fAppendDefault As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetProperties(<Out(), MarshalAs(UnmanagedType.Interface)> ByRef ppStore As IPropertyStore) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ApplyProperties(<MarshalAs(UnmanagedType.Interface)> ByVal psi As IShellItem, <MarshalAs(UnmanagedType.Interface)> ByVal pStore As IPropertyStore, ByVal hwnd As IntPtr, <MarshalAs(UnmanagedType.Interface)> ByVal pSink As IFileOperationProgressSink) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace